#ifndef DTC901_H_INC
#define DTC901_H_INC

#ifdef DTC901X64_EXPORTS
#define DTC901_API __declspec(dllexport)
#else
	#ifdef DTC901_EXPORTS
	#define DTC901_API __declspec(dllexport)
	#else
	#define DTC901_API __declspec(dllimport)
	#endif
#endif

#include <windows.h>
#include "..\dtc_def.h"

#ifndef HCARD_DEF
#define HCARD_DEF
typedef void* HCARD;
#endif

extern "C" DTC901_API DWORD __stdcall DtcGetDllVer(void);
extern "C" DTC901_API int   __stdcall DtcCountCards(void);
extern "C" DTC901_API HCARD __stdcall DtcOpen(int cardIndex);
extern "C" DTC901_API void  __stdcall DtcClose(HCARD hCard);

extern "C" DTC901_API int __stdcall DtcGetFifoRange(HCARD hCard, int fifoId);
extern "C" DTC901_API FifoHead __stdcall DtcGetFifoState(HCARD hCard, int fifoId);

extern "C" DTC901_API int __stdcall DtcWritePcCommands(HCARD hCard, unsigned short *cmdsBuf, int count);
extern "C" DTC901_API int __stdcall DtcReadDtcEvents(HCARD hCard, unsigned short *eventsBuf, int maxCount);
extern "C" DTC901_API int __stdcall DtcReadDtcAcq(HCARD hCard,unsigned short *acqBuf, int acqBufLen);

extern "C" DTC901_API WORD __stdcall DtcGetFreePcChnl(HCARD hCard);
extern "C" DTC901_API BOOL __stdcall DtcClearPcChnl(HCARD hCard, WORD chnl);
extern "C" DTC901_API int  __stdcall DtcWritePcCtrl(HCARD hCard, WORD chnl, unsigned short *ctrlFlow, int ctrlFlowLen);

#endif
